class Robot12 extends Thread {

	public Robot12(String isim) {
		super(isim);
	}

	public void run() {
		try {
			for (int i = 0; i < 5; i++) {
				System.out.println("Oncelik: " + this.getPriority() + "-"
						+ this.getName() + "-->" + i);
			}
		} catch (Exception ex) {
			System.out.println("Hata olustu -->" + ex);
		}
	}
}

public class OrnekIki {
	public static void main(String args[]) {

		Robot12 r1 = new Robot12("A");
		Robot12 r2 = new Robot12("B");
		Robot12 r3 = new Robot12("C");
		Robot12 r4 = new Robot12("D");

		r1.setPriority(Thread.MIN_PRIORITY);
		// r2.setPriority(Thread.NORM_PRIORITY);
		r3.setPriority(Thread.MAX_PRIORITY);
		// r4.setPriority(8); // 10-2 = 8

		r1.start(); // dikkat
		// r2.start(); // dikkat
		r3.start(); // dikkat
		// r4.start(); // dikkat

	}
}
